package edu.sctu.renpingan.imitatesubwaysystem;

//import com.sun.prism.shader.Solid_TextureYV12_AlphaTest_Loader;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by user18 on 2015/5/31.
 */
public class CarryThing {


    //是否有危险物
    public Boolean judgeDangerous(List<String> passagerthing) {
        boolean detan = false;
        List<String> dangerousthing = new ArrayList<String>();
        dangerousthing.add("汽油");
        dangerousthing.add("硫磺");
        dangerousthing.add("火药");
        dangerousthing.add("枪械");
        dangerousthing.add("刀具");
        dangerousthing.add("硫酸");

        for (int i = 0; i <passagerthing.size() ; i++) {
            for (int j = 0; j <dangerousthing.size() ; j++) {
                if(passagerthing.get(i) == dangerousthing.get(j)){
                    detan = true;
                }
            }
        }
        return detan;
    }

    //是否带卡
    public Boolean haveCard(List<String> list){
        boolean card = false;
        for (int i = 0; i < list.size() ; i++) {
            if(list.get(i).equals("地铁卡")){
                card = true;
            }
        }
        return card;
    }

    //购票
    public void buySingTickets(String start,String end){
        System.out.println("您好，您购买的从"+start+"到"+end+"的单程票已出票！请在下方出口取票，谢谢使用");
    }
}